﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Citi.RoutineBase
{
    public class RoutineParameter 
    {
        public string Name { get; set; }
        public Type Type { get; set; }
        public bool Required { get; set; }
        public bool Nullable { get; set; }
        public string Description { get; set; }
    }

    public static class RoutineParameterCollection
    {
        public static RoutineParameter FindByName(this IEnumerable<RoutineParameter> parameters, string name)
        {
            return parameters.FirstOrDefault(x => x.Name == name);
        }
    }
}
    